package com.bytz.modules.cms.reseller.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.bytz.modules.cms.order.entity.Order;
import com.bytz.modules.cms.reseller.entity.ResellerEndUser;

import java.util.List;

/**
 * <p>
 * 莱宝CMS—经销商管理—经销商/终端用户关联表 服务类
 * </p>
 *
 * @author KyleWang
 * @since 2022-10-10
 */
public interface IResellerEndUserService extends IService<ResellerEndUser> {

    /**
     * 根据经销商id和类型获取终端用户
     */
    List<ResellerEndUser> getByResellerId(String resellerId, String type);

    /**
     * 根据经销商id删除
     */
    Boolean deleteByResellerId(String resellerId);

    /**
     * 将订单的shipTo保存到resellerEndUser表
     */
    void updateShipToAndEndUser(Order order);
}
